package com.wql.controller;

import com.aaa.vo.Result;
import com.wql.service.GBrandService;
import com.wql.service.GDepositService;
import com.wql.service.GSortService;
import com.wql.service.GUnitService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wql
 * @version 1.0
 * @date 2023/3/7 16:45
 */
@RestController
@RequestMapping("/business")
public class CommodityController {
    @Autowired
    private GDepositService gDepositService;

    @Autowired
    private GBrandService gBrandService;

    @Autowired
    private GSortService gSortService;

    @Autowired
    private GUnitService gUnitService;

    @PostMapping("/deposit/findAllDeposit")
    public Result findAllDeposit(){
        return gDepositService.findAll();
    }

    @PostMapping("/brand/selectAllBrand")
    public Result selectAllBrand(){
        return gBrandService.selectAll();
    }

    @PostMapping("/unit/selectAllUnit")
    public Result selectAllUnit(){
        return  gUnitService.selectAll();
    }
    @PostMapping("/sort/getSort")
    public Result getSort(){
        return  gSortService.findAll();
    }
}
